/********************************Copyright (c)**********************************\
**
**                   (c) Copyright 2021, Main, China, QD.
**                           All Rights Reserved
**
**                                 By(wo4fisher)
**                           http://www.wo4fisher.com
**
**----------------------------------文件信息------------------------------------
** 文件名称: main.c
** 创建人员: wht
** 创建日期: 2021-10-30
** 文档描述: 
**
**----------------------------------版本信息------------------------------------
** 版本代号: V0.1
** 版本说明: 初始版本
** 演示led流水灯，pca实现ms级延时的使用，同时使用串口输出pca_delay_1ms的值和sys_clk的值
**------------------------------------------------------------------------------
\********************************End of Head************************************/
 
/********************************End of File************************************/
#include "headfile.h"

#if (1==PRINTF_ENABLE)
extern uint32 sys_clk;
extern uint16 pca_delay_1ms;
#endif

void main()
{
    DisableGlobalIRQ();
    board_init();
	  led_init();
    EnableGlobalIRQ();
	
#if (1==PRINTF_ENABLE)
    uart_putstr ( UART_1, "i lvoe you\r\n" );
    printf ( "this is stc8a8k64D4\r\n" );
    printf ( "sysclk= %ld\r\n", sys_clk );
    printf ( "pca_delay_1ms= %d\r\n", pca_delay_1ms );
#endif

    LED1_OFF;
    LED2_OFF;
    LED3_OFF;
    LED4_OFF;

    while ( 1 )
    {
			led_flash_demo(0);
			led_flash_demo(1);
			led_flash_demo(2);
			led_flash_demo(3);
    }
}












